package com.d3.pomodoro.model

import android.graphics.Color
import com.orhanobut.logger.Logger
import java.lang.Exception

class Cate : BaseModel() {
    var title: String = ""     //标题
    var priority: Int = -1       //排序用
    var backup: Int = 0  //归档
    var colorString: String = "" //颜色
    var deadlineTime: Long = 0 //截止日
    var isCreateItem: Boolean = false

    fun getColorResourceId(): Int {
        return try {
            Color.parseColor(colorString)
        } catch (e: Exception) {
            Logger.e("getColor Exception $e")
            Color.parseColor("#000000")
        }

    }
}